package com.yazi.mxz.common.entity.beans;

import com.myframework.smhj.hibernate.Entity;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * GoodsPromote entity. @author MyEclipse Persistence Tools
 */
@javax.persistence.Entity
@Table(name = "MXZ_GOODS_PROMOTE", schema = "MXZ")
public class GoodsPromote extends Entity implements java.io.Serializable {

	// Fields

	private GoodsPromoteId id;
	private StoreGoods storeGoods;
	private String name;
	private Integer status;
	private Float price;
	private Long startTime;
	private Long endTime;
	private Boolean autoOut;
	private Long updateTime;

	// Constructors

	/** default constructor */
	public GoodsPromote() {
	}

	/** minimal constructor */
	public GoodsPromote(GoodsPromoteId id, StoreGoods storeGoods,
			Integer status, Float price, Long startTime, Long endTime,
			Boolean autoOut, Long updateTime) {
		this.id = id;
		this.storeGoods = storeGoods;
		this.status = status;
		this.price = price;
		this.startTime = startTime;
		this.endTime = endTime;
		this.autoOut = autoOut;
		this.updateTime = updateTime;
	}

	/** full constructor */
	public GoodsPromote(GoodsPromoteId id, StoreGoods storeGoods, String name,
			Integer status, Float price, Long startTime, Long endTime,
			Boolean autoOut, Long updateTime) {
		this.id = id;
		this.storeGoods = storeGoods;
		this.name = name;
		this.status = status;
		this.price = price;
		this.startTime = startTime;
		this.endTime = endTime;
		this.autoOut = autoOut;
		this.updateTime = updateTime;
	}

	// Property accessors
	@EmbeddedId
	@AttributeOverrides({
			@AttributeOverride(name = "storeGoodsId", column = @Column(name = "STORE_GOODS_ID", nullable = false, precision = 15, scale = 0)),
			@AttributeOverride(name = "type", column = @Column(name = "TYPE", nullable = false, precision = 8, scale = 0)) })
	public GoodsPromoteId getId() {
		return this.id;
	}

	public void setId(GoodsPromoteId id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "STORE_GOODS_ID", nullable = false, insertable = false, updatable = false)
	public StoreGoods getStoreGoods() {
		return this.storeGoods;
	}

	public void setStoreGoods(StoreGoods storeGoods) {
		this.storeGoods = storeGoods;
	}

	@Column(name = "NAME", length = 250)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "STATUS", nullable = false, precision = 8, scale = 0)
	public Integer getStatus() {
		return this.status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	@Column(name = "PRICE", nullable = false, precision = 8)
	public Float getPrice() {
		return this.price;
	}

	public void setPrice(Float price) {
		this.price = price;
	}

	@Column(name = "START_TIME", nullable = false, precision = 15, scale = 0)
	public Long getStartTime() {
		return this.startTime;
	}

	public void setStartTime(Long startTime) {
		this.startTime = startTime;
	}

	@Column(name = "END_TIME", nullable = false, precision = 15, scale = 0)
	public Long getEndTime() {
		return this.endTime;
	}

	public void setEndTime(Long endTime) {
		this.endTime = endTime;
	}

	@Column(name = "AUTO_OUT", nullable = false, precision = 1, scale = 0)
	public Boolean getAutoOut() {
		return this.autoOut;
	}

	public void setAutoOut(Boolean autoOut) {
		this.autoOut = autoOut;
	}

	@Column(name = "UPDATE_TIME", nullable = false, precision = 15, scale = 0)
	public Long getUpdateTime() {
		return this.updateTime;
	}

	public void setUpdateTime(Long updateTime) {
		this.updateTime = updateTime;
	}

}